home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 19 / macformat_19.iso / Shareware / Developers / NDS Osax v1.0d2 / NDS Osax Readme < prev    next >
Text File  |  1996-05-17  |  3KB  |  79 lines

  1. NDS Osax v1.0d1
  2. Erich G Bratton © 1996
  3. erich@kagi.com
  4.  
  5.  
  6. Description:
  7. The NDS Osax is a small set of the many NetWare 4.1 NetWare Directory Services (NDS) API calls, encapsulated into an AppleScript extension (osax).  This osax is only really useful if you are using Novell's NetWare Client for Macintosh version 5.1 to connect to NetWare 4.1 file servers.  (They may also work with the older MacNDS client, but no guarantees).
  8.  
  9.  
  10. Uses:
  11. Use these in a personal login script to log you in to NDS & mount some volumes (by telling the finder to open some NDS object files), or use it in a departmental shutdown script that looks at your context or user ID and takes an action depending on who you are.
  12.  
  13.  
  14. Tips:
  15. Make a call to NDS_Login with a bogus userID and password (like "xyzzy" & "blah").  If you get a return error of -30545 then you can tell if a network is connected or not if you run a script on a laptop that isn't always on the wire.  Ex:
  16.  
  17. on EthernetExists()
  18.     set theanswer to false
  19.     set theError to 0
  20.     
  21.     --Log in to NDS Tree
  22.     try
  23.         NDSLogin Username "xyzzy" Password "blah"
  24.         set theError to result
  25.     on error errMsg number errNum
  26.         set theError to errNum
  27.     end try
  28.     --Error -30545 is ERR_NO_SERVERS_FOUND.  Hopefully this will catch being offline...
  29.     if (theError is not -30545) then
  30.         set theanswer to true
  31.     end if
  32.     return theanswer
  33. end EthernetExists
  34.  
  35. Another tip is to use the included "Logout from NDS" script as a workaround for PCI powermac's that hang on shutdown when logged into NDS.  Read the script for more info.
  36.  
  37.  
  38. The NDS Osax Dictionary:
  39.  
  40. NDS_ReturnUsername: 
  41. Returns a string containing the username of the currently logged in NDS user
  42.     NDS_ReturnUsername
  43.     Result:   string
  44.  
  45. NDS_ReturnContext: 
  46. Returns a string containing the context of the currently logged in NDS user
  47.     NDS_ReturnContext
  48.     Result:   string
  49.  
  50. NDS_SyncWithServerTime: 
  51. Sets the internal date & time to match NDS
  52.     NDS_SyncWithServerTime
  53.  
  54. NDS_Logout: 
  55. Logs out of the NDS tree (NOTE: may or may not work if there are NetWare volumes in use still on the desktop)
  56.     NDS_Logout
  57.  
  58. NDS_Login: 
  59. Logs into the default NDS Tree & the default context (specified in the NetWare Client control panel) using the supplied username & password
  60.     NDS_Login
  61.         Username  string
  62.         Password  string
  63.     Result:   small integer
  64.  
  65.  
  66. Version History:
  67.  
  68. 1.0d1 - first public release
  69. 1.0d2 - no changes to the OSAX itself, but I fixed the sample script, added a second sample script to show how to workaround PCI powermac's NDS problems.
  70.  
  71.  
  72. Licensing:
  73.  
  74. NDS Osax is free to use for personal use.  NDS Osax may be freely distributed with this README file and all other files included in the distribution.
  75.  
  76. For commercial use, or any use site-wide or department-wide, contact me at erich@kagi.com for an inexpensive license.
  77.  
  78. --Erich Bratton
  79.